import request from '@/utils/request'

// 查询字典数据列表
export function listTreeData(query) {
  return request({
    url: '/system/tree/data/list',
    method: 'get',
    params: query
  })
}

// 查询字典数据详细
export function getTreeData(dataId) {
  return request({
    url: '/system/tree/data/' + dataId,
    method: 'get'
  })
}

// 新增字典数据
export function addTreeData(data) {
  return request({
    url: '/system/tree/data',
    method: 'post',
    data: data
  })
}

// 修改字典数据
export function updateTreeData(data) {
  return request({
    url: '/system/tree/data',
    method: 'put',
    data: data
  })
}

// 删除字典数据
export function delTreeData(dataId) {
  return request({
    url: '/system/tree/data/' + dataId,
    method: 'delete'
  })
}

// 导出字典数据
export function exportTreeData(query) {
  return request({
    url: '/system/tree/data/export',
    method: 'get',
    params: query
  })
}

// 查询字典数据列表
export function listTreeSelect(query) {
  return request({
    url: '/system/tree/data/treeselect',
    method: 'get',
    params: query
  })
}